{% extends 'layout.html' %} 

{% block main %}
<div class="row">
    <div class="col-md-8 main-content">
        {% for article in items.articles %}
        <article class="post">
            <div class="post-head">
                <h1 class="post-title"><a href="#">{{article.title}}</a></h1>
                <div class="post-meta">
                    <span class="author">作者：<a href="#">{{article.author}}</a></span>
                    <time class="post-date"  title="{{(article.post_time*1000)|date('Y-m-d H:i:s',-8*60)}}">• {{(article.post_time*1000)|date('Y年m月d日 H:i:s',-8*60)}}</time>
                </div>
            </div>
            {% if article.src %}
            <div class="featured-media">
                <a href="#" title=""><img src="/www/upload/{{article.src}}"></a>
            </div>
            {% endif %}
            <div class="post-content">
                
                {% autoescape false  %}
                    {{ article.summary }}
                {% endautoescape %}               
            
            </div>
            <div class="post-permalink">
                <a href="#" class="btn btn-default">阅读全文</a>
            </div>
            <footer class="post-footer clearfix">
                <div class="pull-left tag-list">
                    <i class="fa fa-folder-open-o"></i>
                    {% for tag in  article.tags %}
                        <a href="#{{tag.id}}">{{tag.tag}}</a>
                    {% endfor %}
                </div>
                <div class="pull-right share"></div>
            </footer>
        </article>
        {% endfor %}
        <nav class="pagination" role="navigation">
            {% if page.page >1 %}
            <a class="newer-posts" href="?page={{page.page-1}}"><i class="fa fa-angle-left"></i></a>
            {% endif %}
            <span class="page-number">第 {{page.page}} 页 ⁄ 共 {{page.pages}} 页</span>
            {% if page.page < page.pages %}
            <a class="older-posts" href="?page={{page.page+1}}"><i class="fa fa-angle-right"></i></a>
            {% endif %}
        </nav>
    </div>
    <aside class="col-md-4 sidebar">
        <div class="widget">
            <h4 class="title">社区</h4>
            <div class="content community">
                <p>QQ群：462694081</p>
                <p><a href="" title="Laravel中文网问答社区" target="_blank"><i class="fa fa-comments"></i> 问答社区</a></p>
            </div>
        </div>
        <div class="widget">
            <h4 class="title">下载</h4>
            <div class="content download">
                <a href="#" class="btn btn-default btn-block">Laravel &amp; Lumen 一键安装包下载</a>
            </div>
        </div>
        <div class="widget">
            <h4 class="title">标签云</h4>
            <div class="content tag-cloud">
                {% for tag in items.tags %}
                    {% if loop.index < 15 %}
                        <a href="{{tag.id}}">{{tag.tag}}</a>
                    {% endif %}
                {% endfor %}
                {% if item.tags.length > 24 %}
                    <a href="{{tag.id}}">...</a>
                {% endif %}
            </div>
        </div>
    </aside>
</div>
{% endblock %}
